﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;

namespace AcademicPlanner.Framework.Libraries.Auth
{
	public class DBBAuthenticator : IAuthenticator
	{
		private IDbConnection connection;


		public DBBAuthenticator(string pConnection)
		{
			connection = new SqlConnection(pConnection);
		}


		public AuthenticationResult Authenticate(string pUser, string pPassword)
		{
			var rRes = new AuthenticationResult();
			
			// TODO: implement database based authentication
			rRes.userIdentifier = pUser;
			rRes.authentic = true;

			return rRes;
		}

		AuthenticationResult IAuthenticator.Authenticate(string pUser)
		{
			throw new NotImplementedException();
		}

	}
}
